package com.vitabuybuy.tv.ui.mine.order

import android.os.Bundle
import com.vitabuybuy.tv.R
import com.vitabuybuy.tv.databinding.ActivityOrderCommissionBinding
import com.vitabuybuy.tv.databinding.ActivityThirdPartyBindBinding
import com.library.common.base.BaseActivity
import com.vitabuybuy.tv.ui.mine.account.AccountManageActivity
import com.vitabuybuy.tv.ui.mine.order.viewmodel.CommissionViewModel
import com.vitabuybuy.tv.ui.mine.wallet.ChooseTimeActivity
import kotlinx.android.synthetic.main.activity_order_commission.*

class OrderCommissionActivity :
    BaseActivity<CommissionViewModel, ActivityOrderCommissionBinding>() {
    override val isUseBaseTitleBar: Boolean
        get() = true
    override val layoutId: Int
        get() = R.layout.activity_order_commission

    override fun initView(savedInstanceState: Bundle?) {
        setTitle(getString(R.string.order_commission))
        mBinding.mViewModel = viewModel
        tvCount.text = String.format(getString(R.string.order_amount), 80)
    }

    override fun observeData() {
        viewModel.getData()
    }
    override fun eventHandling() {
        rlDate.setOnClickListener {
            ChooseTimeActivity.openActivity(mContext,10002)
        }
    }

    companion object {
        fun openActivity(mContext: BaseActivity<*, *>) {
            mContext.startActivity(null, OrderCommissionActivity::class.java)
        }
    }
}
